package com.gitee.ywj1352.reactive;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public class ReactiveDemo {

    public static void main(String[] args) throws InterruptedException {
        SimplePublisher publisher = new SimplePublisher();
        Flux.from(publisher).subscribe(new BusinessSubscriber(5));
//        for (int i = 0; i < 7; i++) {
//            publisher.publish(i);
//        }
//
//        Flux.just("tom", "jack", "allen")
//                .map(s-> s.concat("@qq.com"))
//                .subscribe(System.out::println);

    }



}
